package com.guodefu.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guodefu.demo.domain.DictionaryDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DictionaryMapper extends BaseMapper<DictionaryDO> {
    String ALL_COLUMNS = "id, type, code, name, ename, description";

    @Select("SELECT " + ALL_COLUMNS + " FROM dictionary WHERE type = #{type}")
    List<DictionaryDO> selectByType(String type);
}
